﻿@model PiscoSourDominio.Reserva
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="Content">

    @using (Html.BeginForm())
    {
    @Html.ValidationSummary(true)
    <div>

        <h2>Registro de Reserva</h2>

        <table class="tblRegistro">
            <tr>
                <th>Restaurante</th>
                <th>@Html.DropDownList("intCodLocal", "Seleccione")
                        @Html.ValidationMessageFor(model => model.intCodLocal)
                 </th>
            </tr>
            <tr>
                <th>Nombre</th>
                <th>@ViewBag.NombreCliente</th>
            </tr>
            <tr>
                <th>Fecha de Reserva</th>
                <td>
                    <div class="conten-etiq">
                        <div class="editor-etiq-izq">
                            @Html.EditorFor(model => model.dtFecReserva)
                            @Html.ValidationMessageFor(model => model.dtFecReserva)
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <th>Cantidad de Personas</th>
                <td>
                    <div class="conten-etiq">
                        <div class="editor-etiq-izq">
                            @Html.EditorFor(model => model.intCantidadPersonas)
                            @Html.ValidationMessageFor(model => model.intCantidadPersonas)
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div class="tblBotones">
                        <input type="submit" id="btnAceptar" value="Aceptar" />
                        <input type="button" id="btnCancelar" value="Cancelar" />
                    </div>        
                </td>
            </tr>

        </table>


</div>
    }
</div>

<script type="text/javascript">
    $(function () {
        /*
        $('#btnAceptar').click(function () {
            window.location = '@Url.Action("ListReserva", "Restaurante")';
        });
        */
        $('#btnCancelar').click(function () {
            window.location = '@Url.Action("ListReserva", "Restaurante")';
        });
    });
</script>